<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>首页</title>
<lui:context/>
</head>
<u:View userCSS="index.css" userJS="index.js" res="jquery.ftabset"
    basePath="/res-system/index/">
    <body>
		<nav class="navbar navbar-inverse" data-role="navigation">
		    <div class="container-fluid t-container-fluid">
		    <div class="navbar-header">
		        <a class="navbar-brand" href="${ctx }"><spring:message code="sys.title" /></a>
		    </div>
		    <div>
		        <!--向左对齐-->
		        <%-- <ul class="nav navbar-nav navbar-left">
		            <li class="dropdown">
		                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
		                    Java
		                    <b class="caret"></b>
		                </a>
		                <ul class="dropdown-menu">
		                    <li><a href="#">jmeter</a></li>
		                    <li><a href="#">EJB</a></li>
		                    <li><a href="#">Jasper Report</a></li>
		                    <li class="divider"></li>
		                    <li><a href="#">分离的链接</a></li>
		                    <li class="divider"></li>
		                    <li><a href="#">另一个分离的链接</a></li>
		                </ul>
		            </li>
		        </ul> --%>
		        <!-- <form class="navbar-form navbar-left" role="search">
		            <button type="submit" class="btn btn-default">
		                向左对齐-提交按钮
		            </button>
		        </form> -->
		        <!-- <p class="navbar-text navbar-left">向左对齐-文本</p> -->
		        <!--向右对齐-->
		        <ul class="nav navbar-nav navbar-right">
		            <li class="dropdown">
		                <a href="#" class="dropdown-toggle t-user-info" data-toggle="dropdown">
			                <img alt="" src="res-system/index/images/user_portrait.png">
		                    ${sessionScope.user.userName } <b class="caret"></b>
		                </a>
		                <ul class="dropdown-menu">
		                    <li><a href="javascript:void(0);"><i class='fa fa-user fa-fw'></i>账号：${sessionScope.user.userId }</a></li>
		                    <li><a href="javascript:void(0);" onclick='IndexPage.switchRole(this)' title='切换角色' class='t-link-switch-role'><i class='fa fa-user-secret 
		                          fa-fw'></i>角色：${sessionScope.user.currentRole.roleName }<i class='fa fa-exchange 
                                  fa-fw t-icon-switch-role'></i></a></li>
		                    <li><a href="javascript:void(0);" onclick='IndexPage.updatePwd(this)'><i class='fa fa-cog fa-fw'></i>修改密码</a></li>
		                    <li class="divider"></li>
		                    <li><a href="<c:url value="logout"/>"><i class='fa fa-sign-out fa-fw'></i>注销</a></li>
		                </ul>
		            </li>
		        </ul>
		        <div class="nav navbar-nav navbar-right m-relative">
		            <a href='javascript:void(0);' class='t-user-task'>
                        <i class="fa fa-bell-o"></i> <span class="m-badge gradient-orange">1</span>
		            </a>
		        </div>
		        <div class="nav navbar-nav navbar-right m-relative">
		            <a href='javascript:void(0);' class='t-user-task'>
    			        <i class="fa fa-tasks"></i> <span class="m-badge gradient-red">12</span>
		            </a>
			    </div>
		        <div class="nav navbar-nav navbar-right m-relative">
		            <a href='javascript:void(0);' class='t-user-task'>
    			        <i class="fa fa-envelope-o"></i> <span class="m-badge gradient-green">4</span>
		            </a>
			    </div>
		    </div>
		    </div>
		</nav>
       	<div class="t-menu-locker">
       		<a href="javascript:void(0);" data-target=".t-menu" onclick="IndexPage.toggleLocker()" data-status='close'></a>
       	</div>
        <aside class="t-menu">
            <!-- 搜索菜单输入框 -->
            <div class='search-box'>
                <input type="search" name="search" placeholder="搜索菜单"><i class="fa fa-search"></i>
            </div>
            <ul id="main-nav" class="nav nav-tabs nav-stacked">
            <c:forEach var="item" items="${requestScope.menus }" varStatus="status">
	            <li>
	                <a href="javascript:void(0);" id="M_${item.resId }" data-url="${item.resPath }" data-text="${item.resName }" data-level="1"
	                    <c:if test="${item.children.size() > 0}">data-toggle='collapse'</c:if>
	                    <c:if test="${item.children.size() > 0}">data-target='#CM_${item.resId}'</c:if>
	                    <c:if test="${item.children.size() == 0}">data-menu</c:if>
	                    ><c:if test='${not empty item.resExt1}'><i class='${item.resExt1}'></i></c:if>${item.resName }</a>
	                <c:if test="${item.children.size() > 0}">
                    <ul id="CM_${item.resId}" data-parent="#M_${item.resId }" class="nav nav-list collapse" style="height: 0px;">
                    <c:forEach var="item2" items="${item.children}" varStatus="status2">
	                   <li>
	                       <a href="javascript:void(0);" id="M_${item2.resId }" data-url="${item2.resPath }" data-text="${item2.resName }" data-level="2"
		                       <c:if test="${item2.children.size() > 0}">data-toggle='collapse'</c:if>
		                       <c:if test="${item2.children.size() > 0}">data-target='#CM_${item2.resId}'</c:if>
			                   <c:if test="${item2.children.size() == 0}">data-menu</c:if>
		                       ><c:if test='${not empty item2.resExt1}'><i class='${item2.resExt1}'></i></c:if>${item2.resName }</a>
		                    <c:if test="${item2.children.size() > 0}">
		                    <ul id="CM_${item2.resId}" data-parent="#M_${item2.resId }" class="nav nav-list collapse" style="height: 0px;">
                            <c:forEach var="item3" items="${item2.children}" varStatus="status3">
                                <li>
		                           <a href="javascript:void(0);" id="M_${item3.resId }" data-url="${item3.resPath }" data-text="${item3.resName }" data-level="3"
		                               <c:if test="${item3.children.size() > 0}">data-toggle='collapse'</c:if>
		                               <c:if test="${item3.children.size() > 0}">data-target='#CM_${item3.resId}'</c:if>
		                               <c:if test="${item3.children.size() == 0}">data-menu</c:if>
		                               ><c:if test='${not empty item3.resExt1}'><i class='${item3.resExt1}'></i></c:if>${item3.resName }</a>
		                         </li>
                            </c:forEach>
                            </ul>
		                    </c:if>
	                   </li>
                    </c:forEach>
                    </ul>
	                </c:if>
	            </li>
            </c:forEach>
            </ul>
        </aside>
        <section class='article-box'></section>
        <footer class='m-beian-footer'>
        	<div class="col-sm-12 copyright">Copyright © 2017  蜀ICP备17023291号-1<br>
                    版权所有：iuie资料网</div>
        </footer>
    </body>
</u:View>
</html>